.class public Les/gz;
.super Ljava/lang/Object;
.source "PopEditMenu.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/gz$d;
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/LinearLayout;

.field private c:Landroid/view/WindowManager;

.field private d:Z

.field private e:Z

.field protected f:Landroid/view/WindowManager$LayoutParams;

.field private g:Les/gz$d;

.field private h:Z

.field i:Landroid/view/View;

.field j:Landroid/view/animation/Animation;

.field private k:Les/zy;


# direct methods
.method public constructor <init>(Landroid/content/Context;ZZ)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Les/gz;->a:Landroid/content/Context;

    .line 3
    iput-boolean p2, p0, Les/gz;->d:Z

    .line 4
    iput-boolean p3, p0, Les/gz;->h:Z

    const/4 p2, 0x0

    .line 5
    iput-boolean p2, p0, Les/gz;->e:Z

    const-string p2, "window"

    .line 6
    invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/view/WindowManager;

    iput-object p1, p0, Les/gz;->c:Landroid/view/WindowManager;

    .line 7
    invoke-virtual {p0}, Les/gz;->b()V

    return-void
.end method

.method static synthetic a(Les/gz;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Les/gz;->e:Z

    return p0
.end method

.method static synthetic a(Les/gz;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Les/gz;->e:Z

    return p1
.end method

.method static synthetic b(Les/gz;)Les/zy;
    .locals 0

    .line 1
    iget-object p0, p0, Les/gz;->k:Les/zy;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 22
    iget-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    if-eqz v0, :cond_0

    const/16 v1, 0x8

    .line 23
    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 24
    :try_start_0
    iget-object v0, p0, Les/gz;->c:Landroid/view/WindowManager;

    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    :goto_0
    const/4 v0, 0x0

    .line 25
    iput-boolean v0, p0, Les/gz;->e:Z

    .line 26
    iget-object v0, p0, Les/gz;->g:Les/gz$d;

    if-eqz v0, :cond_0

    .line 27
    invoke-interface {v0}, Les/gz$d;->onDismiss()V

    :cond_0
    return-void
.end method

.method public a(Landroid/view/View;)V
    .locals 4

    .line 3
    iput-object p1, p0, Les/gz;->i:Landroid/view/View;

    .line 4
    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v1, -0x2

    invoke-direct {v0, v1, v1}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 5
    iget-boolean v1, p0, Les/gz;->d:Z

    if-eqz v1, :cond_1

    .line 6
    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    const/16 v2, 0x35

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 7
    iget-object v1, p0, Les/gz;->a:Landroid/content/Context;

    instance-of v2, v1, Les/hz;

    if-eqz v2, :cond_2

    .line 8
    check-cast v1, Les/hz;

    .line 9
    invoke-interface {v1}, Les/hz;->r()Landroid/graphics/Rect;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 10
    new-instance v2, Landroid/graphics/Rect;

    invoke-direct {v2}, Landroid/graphics/Rect;-><init>()V

    .line 11
    iget-object v3, p0, Les/gz;->a:Landroid/content/Context;

    check-cast v3, Landroid/app/Activity;

    invoke-virtual {v3}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v3

    .line 12
    invoke-virtual {v3, v2}, Landroid/view/View;->getWindowVisibleDisplayFrame(Landroid/graphics/Rect;)V

    .line 13
    iget v2, v2, Landroid/graphics/Rect;->top:I

    .line 14
    iget-boolean v3, p0, Les/gz;->h:Z

    if-nez v3, :cond_0

    .line 15
    invoke-virtual {v1}, Landroid/graphics/Rect;->height()I

    move-result v3

    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->height:I

    .line 16
    :cond_0
    iget v1, v1, Landroid/graphics/Rect;->top:I

    sub-int/2addr v1, v2

    iput v1, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    goto :goto_0

    .line 17
    :cond_1
    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    const/16 v2, 0x11

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 18
    :cond_2
    :goto_0
    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 19
    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    invoke-virtual {v1, p1, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method public a(Les/gz$d;)V
    .locals 0

    .line 20
    iput-object p1, p0, Les/gz;->g:Les/gz$d;

    return-void
.end method

.method public a(Les/zy;)V
    .locals 0

    .line 21
    iput-object p1, p0, Les/gz;->k:Les/zy;

    return-void
.end method

.method protected b()V
    .locals 2

    .line 2
    new-instance v0, Les/gz$a;

    iget-object v1, p0, Les/gz;->a:Landroid/content/Context;

    invoke-direct {v0, p0, v1}, Les/gz$a;-><init>(Les/gz;Landroid/content/Context;)V

    iput-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    .line 3
    new-instance v0, Landroid/view/WindowManager$LayoutParams;

    invoke-direct {v0}, Landroid/view/WindowManager$LayoutParams;-><init>()V

    iput-object v0, p0, Les/gz;->f:Landroid/view/WindowManager$LayoutParams;

    const/4 v1, -0x1

    .line 4
    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    .line 5
    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->height:I

    const/4 v1, -0x2

    .line 6
    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->format:I

    .line 7
    iget-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 8
    iget-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 9
    iget-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    new-instance v1, Les/gz$b;

    invoke-direct {v1, p0}, Les/gz$b;-><init>(Les/gz;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method public c()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Les/gz;->e:Z

    return v0
.end method

.method public d()V
    .locals 3

    .line 1
    :try_start_0
    iget-object v0, p0, Les/gz;->k:Les/zy;

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Les/gz;->k:Les/zy;

    invoke-virtual {v0}, Les/zy;->c()V

    .line 3
    :cond_0
    iget-object v0, p0, Les/gz;->c:Landroid/view/WindowManager;

    iget-object v1, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    iget-object v2, p0, Les/gz;->f:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    .line 4
    :goto_0
    iget-object v0, p0, Les/gz;->j:Landroid/view/animation/Animation;

    if-nez v0, :cond_1

    .line 5
    new-instance v0, Landroid/view/animation/AlphaAnimation;

    const v1, 0x3dcccccd    # 0.1f

    const/high16 v2, 0x3f800000    # 1.0f

    invoke-direct {v0, v1, v2}, Landroid/view/animation/AlphaAnimation;-><init>(FF)V

    iput-object v0, p0, Les/gz;->j:Landroid/view/animation/Animation;

    const-wide/16 v1, 0xfa

    .line 6
    invoke-virtual {v0, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 7
    iget-object v0, p0, Les/gz;->j:Landroid/view/animation/Animation;

    new-instance v1, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 8
    iget-object v0, p0, Les/gz;->j:Landroid/view/animation/Animation;

    new-instance v1, Les/gz$c;

    invoke-direct {v1, p0}, Les/gz$c;-><init>(Les/gz;)V

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V

    .line 9
    :cond_1
    iget-object v0, p0, Les/gz;->j:Landroid/view/animation/Animation;

    invoke-virtual {v0}, Landroid/view/animation/Animation;->start()V

    .line 10
    iget-object v0, p0, Les/gz;->i:Landroid/view/View;

    iget-object v1, p0, Les/gz;->j:Landroid/view/animation/Animation;

    invoke-virtual {v0, v1}, Landroid/view/View;->setAnimation(Landroid/view/animation/Animation;)V

    .line 11
    iget-object v0, p0, Les/gz;->b:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    return-void
.end method
